package com.rc.saas.tenant.vo.invoice;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rc.saas.tenant.common.annotation.Excel;
import com.rc.saas.tenant.model.invoice.InvoiceApply;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author frog
 * @date 2021/3/19
 */
public class InvoiceApplyPrintVo {

    @ExcelProperty(value = "运营商代码", index = 0)
    private String tenantCode;

    @ExcelProperty(value = "发票类型", index = 2)
    private String invoiceType;

    @ExcelProperty(value = "抬头", index = 7)
    private String invoiceTitle;

    @ExcelProperty(value = "开票金额", index = 6)
    private BigDecimal amount;

    @ExcelProperty(value = "开票类型", index = 3)
    private String invoiceNormalType;

    @ExcelProperty(value = "税号", index = 8)
    private String companyCredit;

    @ExcelProperty(value = "公司地址", index = 9)
    private String companyAddress;

    @ExcelProperty(value = "公司电话", index = 10)
    private String companyTel;

    @ExcelProperty(value = "邮箱", index = 15)
    private String companyEmail;

    @ExcelProperty(value = "开户行", index = 11)
    private String companyBank;

    @ExcelProperty(value = "公司银行账号", index = 12)
    private String companyBankAccount;

    @ExcelProperty(value = "收件人手机号", index = 18)
    private String addresseeTel;
    @ExcelProperty(value = "收件人", index = 17)
    private String addressee;
    @ExcelProperty(value = "邮寄地址", index = 16)
    private String address;

    @ExcelProperty(value = "公司注册地址", index = 13)
    private String registerAddress;
    @ExcelProperty(value = "注册固定电话", index = 14)
    private String registerTel;

    @ExcelProperty(value = "邮编", index = 19)
    private String postcode;

    @ExcelProperty(value = "桩群类型", index = 1)
    private String proxyType;


    @ExcelProperty(value = "添加时间", index = 20)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ExcelProperty(value = "昵称", index = 4)
    private String nickname;
    @ExcelProperty(value = "手机号", index = 5)
    private String mobile;

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    public String getInvoiceType() {
        if ("0".equals(invoiceType)) {
            return "普通发票";
        } else if ("1".equals(invoiceType)) {
            return "增值税专用发票";
        } else if ("2".equals(invoiceType)) {
            return "增值税普通发票-电子发票";
        } else if ("3".equals(invoiceType)) {
            return "增值税普通发票-纸质发票";
        }
        return invoiceType;
    }

    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    public String getInvoiceTitle() {
        return invoiceTitle;
    }

    public void setInvoiceTitle(String invoiceTitle) {
        this.invoiceTitle = invoiceTitle;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getInvoiceNormalType() {
        if ("0".equals(invoiceNormalType)) {
            return "个人开票";
        } else if ("1".equals(invoiceNormalType)) {
            return "企业开票";
        }
        return invoiceNormalType;
    }

    public void setInvoiceNormalType(String invoiceNormalType) {
        this.invoiceNormalType = invoiceNormalType;
    }

    public String getCompanyCredit() {
        return companyCredit;
    }

    public void setCompanyCredit(String companyCredit) {
        this.companyCredit = companyCredit;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getCompanyTel() {
        return companyTel;
    }

    public void setCompanyTel(String companyTel) {
        this.companyTel = companyTel;
    }

    public String getCompanyEmail() {
        return companyEmail;
    }

    public void setCompanyEmail(String companyEmail) {
        this.companyEmail = companyEmail;
    }

    public String getCompanyBank() {
        return companyBank;
    }

    public void setCompanyBank(String companyBank) {
        this.companyBank = companyBank;
    }

    public String getCompanyBankAccount() {
        return companyBankAccount;
    }

    public void setCompanyBankAccount(String companyBankAccount) {
        this.companyBankAccount = companyBankAccount;
    }

    public String getAddresseeTel() {
        return addresseeTel;
    }

    public void setAddresseeTel(String addresseeTel) {
        this.addresseeTel = addresseeTel;
    }

    public String getAddressee() {
        return addressee;
    }

    public void setAddressee(String addressee) {
        this.addressee = addressee;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getRegisterAddress() {
        return registerAddress;
    }

    public void setRegisterAddress(String registerAddress) {
        this.registerAddress = registerAddress;
    }

    public String getRegisterTel() {
        return registerTel;
    }

    public void setRegisterTel(String registerTel) {
        this.registerTel = registerTel;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public String getProxyType() {
        if ("0".equals(proxyType)) {
            return "自开";
        } else if ("1".equals(proxyType)) {
            return "代开";
        }
        return proxyType;
    }

    public void setProxyType(String proxyType) {
        this.proxyType = proxyType;
    }


    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
}
